package cn.bdqn.applysystem.util;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.bdqn.applysystem.entity.User;
import cn.bdqn.applysystem.service.UserService;

public class demo {
	
	@Test
	public void ttttt(){
		ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
//		StudentService studentService = (StudentService)context.getBean("studentServiceImpl");
		UserService userService = (UserService)context.getBean("userServiceImpl");
		User user = userService.login("wangli", "wangli");
		System.out.println("1");
		System.out.println(user.getRole().getRoleName());
	}
	
}
